/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Cristian
 */
@Entity
@Table(name = "scthtbdatosgen")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Scthtbdatosgen.findAll", query = "SELECT s FROM Scthtbdatosgen s"),
    @NamedQuery(name = "Scthtbdatosgen.findByScthtbdatosgenid", query = "SELECT s FROM Scthtbdatosgen s WHERE s.scthtbdatosgenid = :scthtbdatosgenid"),
    @NamedQuery(name = "Scthtbdatosgen.findByCedula", query = "SELECT s FROM Scthtbdatosgen s WHERE s.cedula = :cedula"),
    @NamedQuery(name = "Scthtbdatosgen.findByNombres", query = "SELECT s FROM Scthtbdatosgen s WHERE s.nombres = :nombres"),
    @NamedQuery(name = "Scthtbdatosgen.findByApellidopat", query = "SELECT s FROM Scthtbdatosgen s WHERE s.apellidopat = :apellidopat"),
    @NamedQuery(name = "Scthtbdatosgen.findByApellidomat", query = "SELECT s FROM Scthtbdatosgen s WHERE s.apellidomat = :apellidomat"),
    @NamedQuery(name = "Scthtbdatosgen.findByTelefono1", query = "SELECT s FROM Scthtbdatosgen s WHERE s.telefono1 = :telefono1"),
    @NamedQuery(name = "Scthtbdatosgen.findByTelefono2", query = "SELECT s FROM Scthtbdatosgen s WHERE s.telefono2 = :telefono2"),
    @NamedQuery(name = "Scthtbdatosgen.findByTelefono3", query = "SELECT s FROM Scthtbdatosgen s WHERE s.telefono3 = :telefono3"),
    @NamedQuery(name = "Scthtbdatosgen.findByDireccion", query = "SELECT s FROM Scthtbdatosgen s WHERE s.direccion = :direccion"),
    @NamedQuery(name = "Scthtbdatosgen.findByEmail", query = "SELECT s FROM Scthtbdatosgen s WHERE s.email = :email"),
    @NamedQuery(name = "Scthtbdatosgen.findByFecharegistro", query = "SELECT s FROM Scthtbdatosgen s WHERE s.fecharegistro = :fecharegistro"),
    @NamedQuery(name = "Scthtbdatosgen.findByNombrefoto", query = "SELECT s FROM Scthtbdatosgen s WHERE s.nombrefoto = :nombrefoto"),
    @NamedQuery(name = "Scthtbdatosgen.findByFechanacimiento", query = "SELECT s FROM Scthtbdatosgen s WHERE s.fechanacimiento = :fechanacimiento"),
    @NamedQuery(name = "Scthtbdatosgen.findByPassw", query = "SELECT s FROM Scthtbdatosgen s WHERE s.passw = :passw"),
    @NamedQuery(name = "Scthtbdatosgen.findByPasswordquestion", query = "SELECT s FROM Scthtbdatosgen s WHERE s.passwordquestion = :passwordquestion"),
    @NamedQuery(name = "Scthtbdatosgen.findByPasswordanswer", query = "SELECT s FROM Scthtbdatosgen s WHERE s.passwordanswer = :passwordanswer"),
    @NamedQuery(name = "Scthtbdatosgen.findByAprobado", query = "SELECT s FROM Scthtbdatosgen s WHERE s.aprobado = :aprobado"),
    @NamedQuery(name = "Scthtbdatosgen.findByBloqueado", query = "SELECT s FROM Scthtbdatosgen s WHERE s.bloqueado = :bloqueado"),
    @NamedQuery(name = "Scthtbdatosgen.findByFechacambiopass", query = "SELECT s FROM Scthtbdatosgen s WHERE s.fechacambiopass = :fechacambiopass"),
    @NamedQuery(name = "Scthtbdatosgen.findByFechultimautentusu", query = "SELECT s FROM Scthtbdatosgen s WHERE s.fechultimautentusu = :fechultimautentusu"),
    @NamedQuery(name = "Scthtbdatosgen.findByObservaciones", query = "SELECT s FROM Scthtbdatosgen s WHERE s.observaciones = :observaciones"),
    @NamedQuery(name = "Scthtbdatosgen.findByFechabloqueo", query = "SELECT s FROM Scthtbdatosgen s WHERE s.fechabloqueo = :fechabloqueo")})
public class Scthtbdatosgen implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "scthtbdatosgenid")
    private Integer scthtbdatosgenid;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 10)
    @Column(name = "cedula")
    private String cedula;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "nombres")
    private String nombres;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 25)
    @Column(name = "apellidopat")
    private String apellidopat;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 25)
    @Column(name = "apellidomat")
    private String apellidomat;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 10)
    @Column(name = "telefono_1")
    private String telefono1;
    @Size(max = 10)
    @Column(name = "telefono_2")
    private String telefono2;
    @Size(max = 10)
    @Column(name = "telefono_3")
    private String telefono3;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 255)
    @Column(name = "direccion")
    private String direccion;
    // @Pattern(regexp="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", message="Invalid email")//if the field contains email address consider using this annotation to enforce field validation
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 150)
    @Column(name = "email")
    private String email;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fecharegistro")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecharegistro;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "nombrefoto")
    private String nombrefoto;
    @Column(name = "fechanacimiento")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechanacimiento;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "passw")
    private String passw;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 255)
    @Column(name = "passwordquestion")
    private String passwordquestion;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 255)
    @Column(name = "passwordanswer")
    private String passwordanswer;
    @Basic(optional = false)
    @NotNull
    @Column(name = "aprobado")
    private boolean aprobado;
    @Basic(optional = false)
    @NotNull
    @Column(name = "bloqueado")
    private boolean bloqueado;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fechacambiopass")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechacambiopass;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fechultimautentusu")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechultimautentusu;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 255)
    @Column(name = "observaciones")
    private String observaciones;
    @Column(name = "fechabloqueo")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechabloqueo;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scthtbdatosgenid")
    private Collection<Scsgtbusurol> scsgtbusurolCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scthtbdatosgenid")
    private Collection<Sclbtblibper> sclbtblibperCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scthtbdatosgenid")
    private Collection<Sctstbparticip> sctstbparticipCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scthtbdatosgenid")
    private Collection<Scrvtbrepubrev> scrvtbrepubrevCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scthtbdatosgenid")
    private Collection<Scsgtbautentic> scsgtbautenticCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scthtbdatosgenid")
    private Collection<Scittbfadece> scittbfadeceCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "sctbtbdatosgenid")
    private Collection<Sciftbinftecn> sciftbinftecnCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "sctbtbdatosgenid")
    private Collection<Sciftbinfdoc> sciftbinfdocCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scthtbdatosgenid")
    private Collection<Sclbtblibros> sclbtblibrosCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "sctbtbdatosgenid")
    private Collection<Sciftbplandoc> sciftbplandocCollection;
    @JoinColumn(name = "scthtbsexosid", referencedColumnName = "scthtbsexosid")
    @ManyToOne(optional = false)
    private Scthtbsexos scthtbsexosid;
    @JoinColumn(name = "sclgtbciudadid", referencedColumnName = "sclgtbciudadid")
    @ManyToOne(optional = false)
    private Sclgtbciudad sclgtbciudadid;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scthtbdatosgenid")
    private Collection<Scthtbtitulosa> scthtbtitulosaCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scthtbdatosgenid")
    private Collection<Scrvtbpubreper> scrvtbpubreperCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scthtbdatosgenid")
    private Collection<Scthtbdatgenpy> scthtbdatgenpyCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scthtbdatosgenid")
    private Collection<Pydgtbinf> pydgtbinfCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scthtbdatosgenid")
    private Collection<Sctstbtesis> sctstbtesisCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "scthtbdatosgenid")
    private Collection<Pydgtbresponsa> pydgtbresponsaCollection;

    public Scthtbdatosgen() {
    }

    public Scthtbdatosgen(Integer scthtbdatosgenid) {
        this.scthtbdatosgenid = scthtbdatosgenid;
    }

    public Scthtbdatosgen(Integer scthtbdatosgenid, String cedula, String nombres, String apellidopat, String apellidomat, String telefono1, String direccion, String email, Date fecharegistro, String nombrefoto, String passw, String passwordquestion, String passwordanswer, boolean aprobado, boolean bloqueado, Date fechacambiopass, Date fechultimautentusu, String observaciones) {
        this.scthtbdatosgenid = scthtbdatosgenid;
        this.cedula = cedula;
        this.nombres = nombres;
        this.apellidopat = apellidopat;
        this.apellidomat = apellidomat;
        this.telefono1 = telefono1;
        this.direccion = direccion;
        this.email = email;
        this.fecharegistro = fecharegistro;
        this.nombrefoto = nombrefoto;
        this.passw = passw;
        this.passwordquestion = passwordquestion;
        this.passwordanswer = passwordanswer;
        this.aprobado = aprobado;
        this.bloqueado = bloqueado;
        this.fechacambiopass = fechacambiopass;
        this.fechultimautentusu = fechultimautentusu;
        this.observaciones = observaciones;
    }

    public Integer getScthtbdatosgenid() {
        return scthtbdatosgenid;
    }

    public void setScthtbdatosgenid(Integer scthtbdatosgenid) {
        this.scthtbdatosgenid = scthtbdatosgenid;
    }

    public String getCedula() {
        return cedula;
    }

    public void setCedula(String cedula) {
        this.cedula = cedula;
    }

    public String getNombres() {
        return nombres;
    }

    public void setNombres(String nombres) {
        this.nombres = nombres;
    }

    public String getApellidopat() {
        return apellidopat;
    }

    public void setApellidopat(String apellidopat) {
        this.apellidopat = apellidopat;
    }

    public String getApellidomat() {
        return apellidomat;
    }

    public void setApellidomat(String apellidomat) {
        this.apellidomat = apellidomat;
    }

    public String getTelefono1() {
        return telefono1;
    }

    public void setTelefono1(String telefono1) {
        this.telefono1 = telefono1;
    }

    public String getTelefono2() {
        return telefono2;
    }

    public void setTelefono2(String telefono2) {
        this.telefono2 = telefono2;
    }

    public String getTelefono3() {
        return telefono3;
    }

    public void setTelefono3(String telefono3) {
        this.telefono3 = telefono3;
    }

    public String getDireccion() {
        return direccion;
    }

    public void setDireccion(String direccion) {
        this.direccion = direccion;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Date getFecharegistro() {
        return fecharegistro;
    }

    public void setFecharegistro(Date fecharegistro) {
        this.fecharegistro = fecharegistro;
    }

    public String getNombrefoto() {
        return nombrefoto;
    }

    public void setNombrefoto(String nombrefoto) {
        this.nombrefoto = nombrefoto;
    }

    public Date getFechanacimiento() {
        return fechanacimiento;
    }

    public void setFechanacimiento(Date fechanacimiento) {
        this.fechanacimiento = fechanacimiento;
    }

    public String getPassw() {
        return passw;
    }

    public void setPassw(String passw) {
        this.passw = passw;
    }

    public String getPasswordquestion() {
        return passwordquestion;
    }

    public void setPasswordquestion(String passwordquestion) {
        this.passwordquestion = passwordquestion;
    }

    public String getPasswordanswer() {
        return passwordanswer;
    }

    public void setPasswordanswer(String passwordanswer) {
        this.passwordanswer = passwordanswer;
    }

    public boolean getAprobado() {
        return aprobado;
    }

    public void setAprobado(boolean aprobado) {
        this.aprobado = aprobado;
    }

    public boolean getBloqueado() {
        return bloqueado;
    }

    public void setBloqueado(boolean bloqueado) {
        this.bloqueado = bloqueado;
    }

    public Date getFechacambiopass() {
        return fechacambiopass;
    }

    public void setFechacambiopass(Date fechacambiopass) {
        this.fechacambiopass = fechacambiopass;
    }

    public Date getFechultimautentusu() {
        return fechultimautentusu;
    }

    public void setFechultimautentusu(Date fechultimautentusu) {
        this.fechultimautentusu = fechultimautentusu;
    }

    public String getObservaciones() {
        return observaciones;
    }

    public void setObservaciones(String observaciones) {
        this.observaciones = observaciones;
    }

    public Date getFechabloqueo() {
        return fechabloqueo;
    }

    public void setFechabloqueo(Date fechabloqueo) {
        this.fechabloqueo = fechabloqueo;
    }

    @XmlTransient
    public Collection<Scsgtbusurol> getScsgtbusurolCollection() {
        return scsgtbusurolCollection;
    }

    public void setScsgtbusurolCollection(Collection<Scsgtbusurol> scsgtbusurolCollection) {
        this.scsgtbusurolCollection = scsgtbusurolCollection;
    }

    @XmlTransient
    public Collection<Sclbtblibper> getSclbtblibperCollection() {
        return sclbtblibperCollection;
    }

    public void setSclbtblibperCollection(Collection<Sclbtblibper> sclbtblibperCollection) {
        this.sclbtblibperCollection = sclbtblibperCollection;
    }

    @XmlTransient
    public Collection<Sctstbparticip> getSctstbparticipCollection() {
        return sctstbparticipCollection;
    }

    public void setSctstbparticipCollection(Collection<Sctstbparticip> sctstbparticipCollection) {
        this.sctstbparticipCollection = sctstbparticipCollection;
    }

    @XmlTransient
    public Collection<Scrvtbrepubrev> getScrvtbrepubrevCollection() {
        return scrvtbrepubrevCollection;
    }

    public void setScrvtbrepubrevCollection(Collection<Scrvtbrepubrev> scrvtbrepubrevCollection) {
        this.scrvtbrepubrevCollection = scrvtbrepubrevCollection;
    }

    @XmlTransient
    public Collection<Scsgtbautentic> getScsgtbautenticCollection() {
        return scsgtbautenticCollection;
    }

    public void setScsgtbautenticCollection(Collection<Scsgtbautentic> scsgtbautenticCollection) {
        this.scsgtbautenticCollection = scsgtbautenticCollection;
    }

    @XmlTransient
    public Collection<Scittbfadece> getScittbfadeceCollection() {
        return scittbfadeceCollection;
    }

    public void setScittbfadeceCollection(Collection<Scittbfadece> scittbfadeceCollection) {
        this.scittbfadeceCollection = scittbfadeceCollection;
    }

    @XmlTransient
    public Collection<Sciftbinftecn> getSciftbinftecnCollection() {
        return sciftbinftecnCollection;
    }

    public void setSciftbinftecnCollection(Collection<Sciftbinftecn> sciftbinftecnCollection) {
        this.sciftbinftecnCollection = sciftbinftecnCollection;
    }

    @XmlTransient
    public Collection<Sciftbinfdoc> getSciftbinfdocCollection() {
        return sciftbinfdocCollection;
    }

    public void setSciftbinfdocCollection(Collection<Sciftbinfdoc> sciftbinfdocCollection) {
        this.sciftbinfdocCollection = sciftbinfdocCollection;
    }

    @XmlTransient
    public Collection<Sclbtblibros> getSclbtblibrosCollection() {
        return sclbtblibrosCollection;
    }

    public void setSclbtblibrosCollection(Collection<Sclbtblibros> sclbtblibrosCollection) {
        this.sclbtblibrosCollection = sclbtblibrosCollection;
    }

    @XmlTransient
    public Collection<Sciftbplandoc> getSciftbplandocCollection() {
        return sciftbplandocCollection;
    }

    public void setSciftbplandocCollection(Collection<Sciftbplandoc> sciftbplandocCollection) {
        this.sciftbplandocCollection = sciftbplandocCollection;
    }

    public Scthtbsexos getScthtbsexosid() {
        return scthtbsexosid;
    }

    public void setScthtbsexosid(Scthtbsexos scthtbsexosid) {
        this.scthtbsexosid = scthtbsexosid;
    }

    public Sclgtbciudad getSclgtbciudadid() {
        return sclgtbciudadid;
    }

    public void setSclgtbciudadid(Sclgtbciudad sclgtbciudadid) {
        this.sclgtbciudadid = sclgtbciudadid;
    }

    @XmlTransient
    public Collection<Scthtbtitulosa> getScthtbtitulosaCollection() {
        return scthtbtitulosaCollection;
    }

    public void setScthtbtitulosaCollection(Collection<Scthtbtitulosa> scthtbtitulosaCollection) {
        this.scthtbtitulosaCollection = scthtbtitulosaCollection;
    }

    @XmlTransient
    public Collection<Scrvtbpubreper> getScrvtbpubreperCollection() {
        return scrvtbpubreperCollection;
    }

    public void setScrvtbpubreperCollection(Collection<Scrvtbpubreper> scrvtbpubreperCollection) {
        this.scrvtbpubreperCollection = scrvtbpubreperCollection;
    }

    @XmlTransient
    public Collection<Scthtbdatgenpy> getScthtbdatgenpyCollection() {
        return scthtbdatgenpyCollection;
    }

    public void setScthtbdatgenpyCollection(Collection<Scthtbdatgenpy> scthtbdatgenpyCollection) {
        this.scthtbdatgenpyCollection = scthtbdatgenpyCollection;
    }

    @XmlTransient
    public Collection<Pydgtbinf> getPydgtbinfCollection() {
        return pydgtbinfCollection;
    }

    public void setPydgtbinfCollection(Collection<Pydgtbinf> pydgtbinfCollection) {
        this.pydgtbinfCollection = pydgtbinfCollection;
    }

    @XmlTransient
    public Collection<Sctstbtesis> getSctstbtesisCollection() {
        return sctstbtesisCollection;
    }

    public void setSctstbtesisCollection(Collection<Sctstbtesis> sctstbtesisCollection) {
        this.sctstbtesisCollection = sctstbtesisCollection;
    }

    @XmlTransient
    public Collection<Pydgtbresponsa> getPydgtbresponsaCollection() {
        return pydgtbresponsaCollection;
    }

    public void setPydgtbresponsaCollection(Collection<Pydgtbresponsa> pydgtbresponsaCollection) {
        this.pydgtbresponsaCollection = pydgtbresponsaCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (scthtbdatosgenid != null ? scthtbdatosgenid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Scthtbdatosgen)) {
            return false;
        }
        Scthtbdatosgen other = (Scthtbdatosgen) object;
        if ((this.scthtbdatosgenid == null && other.scthtbdatosgenid != null) || (this.scthtbdatosgenid != null && !this.scthtbdatosgenid.equals(other.scthtbdatosgenid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Scthtbdatosgen[ scthtbdatosgenid=" + scthtbdatosgenid + " ]";
    }
    
}
